package com.zqxq.lottery.api.controller;


import com.zqxq.common.constant.Result;
import com.zqxq.lottery.api.feign.LotteryServerFeignClient;
import com.zqxq.lottery.entity.bo.jczq.MatchApiBO;
import com.zqxq.lottery.entity.vo.jczq.HomeMatchVO;
import com.zqxq.lottery.entity.vo.jczq.MatchApiVO;
import com.zqxq.lottery.entity.vo.sys.SysBannerVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(value = "首页接口",tags = "首页接口")
@RestController
@Slf4j
@RequestMapping(value = "/home", produces = "application/json")
public class HomeController {

    @Autowired
    private LotteryServerFeignClient lotteryServerFeignClient;

    @PostMapping("/hot/match/list")
    @ApiOperation(value = "焦点赛事", notes = "焦点赛事")
    public Result<List<HomeMatchVO>> homeHotMatchList(){
        return lotteryServerFeignClient.homeHotMatchList();
    }

    @PostMapping("/hot/match/list2")
    @ApiOperation(value = "热门赛事", notes = "热门赛事")
    public Result<List<HomeMatchVO>> homeHotMatchList2(){
        return lotteryServerFeignClient.homeHotMatchList2();
    }

    @PostMapping("/channel/count")
    @ApiOperation(value = "下载渠道统计", notes = "下载渠道统计")
    public Result downloadChannelCount(@ApiParam(value = "渠道",required = false) @RequestParam("channel") String channel,
                                       @ApiParam(value = "downSource 1-Android;2-IOS;3-H5",required = false) @RequestParam("downSource") String downSource){
        return lotteryServerFeignClient.downloadChannelCount(channel,downSource);
    }
}
